package com.eclipse.e20200117_周考_servlet_curd.com.qf.crud.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.eclipse.e20200117_周考_servlet_curd.com.qf.crud.dao.StudentDao;

@WebServlet("/servletStudentAdd")
public class StudentServletAdd extends HttpServlet{
	
	private static Logger logger = LogManager.getLogger();
	private static StudentDao dao = new StudentDao();
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setContentType("text/json;charset=utf-8");
		PrintWriter out = response.getWriter();
		dao.add();
		logger.trace("添加成功"); 
	}
}
